home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / prodz18b.zip / PROUT1.BAT < prev   
DOS Batch File  |  1992-02-22  |  4KB  |  116 lines

  1. @echo off
  2. rem -- GOTO 4TESTEXT if you are running 4DOS or NDOS
  3. rem -- GOTO TESTEXT if you are running MSDOS, DR-DOS or PC-DOS
  4. goto 4testext
  5.  
  6. rem -- Process a single upload file - for ProDOOR 3.44
  7. rem -- Passed Parameters:
  8. rem -- * %1  Log File
  9. rem -- * %2  File to Test
  10. rem -- * %3  COM Port
  11. rem -- * %4  Conference Number
  12. rem -- * %5  Play Directory
  13. rem -- * %6  PCB Directory
  14. rem -- ** See PROUTEST.BAT if you want to add new parameters or change the **
  15. rem -- ** order of the current passed parameters.                          **
  16.  
  17. rem -- Determine file type and branch to proper test case using TESTFILE.EXE
  18. :testext
  19. testfile gif zip arj lzh
  20. if errorlevel == 4 goto gif
  21. if errorlevel == 3 goto zip
  22. if errorlevel == 2 goto zip
  23. if errorlevel == 1 goto zip
  24. goto unknown
  25.  
  26. rem -- Determing file type and branch to proper test case using 4DOS commands
  27. :4testext
  28. if %@ext[%2] == gif goto gif
  29. if %@ext[%2] == zip goto zip
  30. if %@ext[%2] == arj goto zip
  31. if %@ext[%2] == lzh goto zip
  32. goto unknown
  33.  
  34. rem -- All unknown file types are moved to the HOLD directory for
  35. rem -- review by the sysop.  If it's a "postable" file, the user
  36. rem -- will be given credit.
  37. :unknown
  38. proecho %3 File type unknown!  Moving Offline for Review..~
  39. mov %2 h:\hold
  40. goto end
  41.  
  42. rem -- Test GIF file using GIFTEST by Dave Navarro, Jr.
  43. rem -- * /A   forces the GIF to be made a private upload, even in public
  44. rem -- *      upload conferences.
  45. rem -- * /B:3 tells GIFtest were running ProDoor 3.44 dated after 12/31/91
  46. rem -- * /D   tells GIFtest to do CRC duplicate checking.
  47. rem -- * /E   tells GIFtest to erase any GIF which is Invalid, a Duplicate,
  48. rem -- *      or does not meet the minimum resolution.
  49. rem -- * /F:  tells GIFtest where to find the description file to modify.
  50. rem -- * /L   tells GIFtest to log all GIF information to GIFLOG in the
  51. rem -- *      current directory
  52. rem -- * /M:  tells GIFtest to invalidate any GIFs which are not at least
  53. rem -- *      321x201x16 in resolution.
  54. rem -- * /P:  tells GIFtest to send all output to the COM port as well as
  55. rem -- *      to the screen.
  56. rem -- ** There are other parameters available, see GIFtest for more info **
  57. :gif
  58. giftest %2 /A/B:3/D/E/F:%6\$DOOR.NAM/L/M:321x201x16/P:%3
  59. goto end
  60.  
  61. rem -- Test Archives using ZipLab Plus by Jeffrey S. Morley
  62. rem -- ZipLab Plus tests ZIP, ARJ, and LZH files
  63. rem -- * The SET PCBDOOR=PRODOOR command let's ZPLUS know that we
  64. rem -- * are running ProDoor instead of PCBoard.
  65. rem -- * If any file is deleted, moved or renamed, you MUST delete
  66. rem -- * the DSZLOG file in order for ProDoor to work properly.
  67. :zip
  68. SET PCBDOOR=PRODOOR
  69. ptest %2 %6\ptest.cfg
  70. SET PCBDOOR=
  71. if not exist %2 del %dszlog%
  72. if not exist %2 goto end
  73. goto diz
  74.  
  75. rem -- Search for FILE_ID.DIZ using ProDIZ by Dave Navarro, Jr.
  76. rem -- If one is found, import it as the description.
  77. rem -- ProDIZ supports ZIP, ARJ, and LZH files
  78. rem -- * /AV tells PRODIZ to add the AV serial number to the description
  79. rem -- *     of any ZIP files that contain one.
  80. rem -- * /D  tells PRODIZ to include the number of files in the archive
  81. rem -- *     and the oldest/newst file dates.
  82. rem -- * /O: tells PRODIZ to reject any file that doesn't contain at least
  83. rem -- *     one file with a 01/92 filedate or newer.
  84. rem -- * /U  tells PRODIZ to include the uncompressed size of the archive
  85. rem -- * in the description.
  86. :diz
  87. proecho %3 ~Searching for FILE_ID.DIZ...~
  88. prodiz %2 %6\$door.nam /d /u /av /o:9201
  89.  
  90. rem -- GOTO 4ISZIP if you are running 4DOS or NDOS
  91. rem -- GOTO ISZIP if you are running MSDOS, DR-DOS, or PC-DOS
  92. goto 4iszip
  93.  
  94. rem -- test archive extension again using 4DOS commands
  95. :4iszip
  96. if %@ext[%2] == zip goto end
  97. goto tozip
  98.  
  99. rem -- test archive extension using TESTFILE.EXE
  100. :iszip
  101. testfile zip
  102. if errorlevel == 1 goto end
  103. goto tozip
  104.  
  105. rem -- Convert any archive which is not a ZIP to ZIP format using
  106. rem -- AC (Archive Convert) by Donald Langhorn.
  107. rem -- Requires CDD command in 4DOS or CDTO.COM program (public domain)
  108. :tozip
  109. proecho %3 ~Converting to ZIP format...~
  110. CDD %5
  111. ac /z %2
  112. cdd d:\prodoor
  113. if exist %dszlog% del %dszlog%
  114.  
  115. :end
  116.